package com.maoyongqi.springboot.controller;


import com.maoyongqi.springboot.entity.Employee;
import com.maoyongqi.springboot.service.IEmployeeService;
import com.maoyongqi.springboot.service.impl.EmployeeServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author jobob
 * @since 2019-05-29
 */
@RestController
@RequestMapping("/employee")
public class EmployeeController {

    @Autowired
    EmployeeServiceImpl employeeService;

    @Autowired
    IEmployeeService iservice;

    @GetMapping("/getEMP/{id}")
    public Employee getEmployee(@PathVariable("id")Integer id){
        return iservice.getById(id);
    }
}
